/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package com.plian.system.service.pf;

import com.plian.system.entity.pf.BaseSalaryDetail;
import com.plian.system.excel.ImportResult;
import com.plian.system.model.R;
import com.plian.system.mybatis.base.BaseService;
import com.plian.system.vo.pf.BaseSalaryDetailVO;

import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.concurrent.Future;

/**
 * 服务类
 *
 * @author
 * @since 2019-09-27
 */
public interface IBaseSalaryDetailService extends BaseService<BaseSalaryDetail> {

    /**
     * 每月只能填写一次
     * @param baseSalaryDetail
     * @return
     */
    String checkYear(BaseSalaryDetail baseSalaryDetail);

    /**
     * 保存 包含子表
     * @param baseSalaryDetail
     * @return
     */
    boolean submit(BaseSalaryDetail baseSalaryDetail);

    /**
     * 获取detail obj对象
     * @param salaryDetailVO
     * @return
     */
    R<BaseSalaryDetailVO> getDetailObj(BaseSalaryDetailVO salaryDetailVO);


    /**
     * 市属企业工资总额本部职工明细表 根据填报时间 新增
     * @param baseSalaryDetail
     * @return
     */
    R initAdd(BaseSalaryDetail baseSalaryDetail);

    /**
     * 集团工资填报
     * @param progressId
     * @param inputStream
     * @return
     */
    Future<ImportResult> importExcel(String progressId, InputStream inputStream);

    /**
     * 导入模板下载
     * @param response
     * @param os
     */
    void exportTemplateExcel(HttpServletResponse response, OutputStream os);
}
